export default {
    mounted() {
        window.addEventListener('resize', this.handleResizeChart);
    },
    beforeDestroy() {
        window.removeEventListener('resize', this.handleResizeChart);
    },
    methods: {
        handleResizeChart() {
            const echartsArr = document.querySelectorAll("[_echarts_instance_]");
            if (echartsArr.length) {
                echartsArr.forEach(f => {
                    this.$echarts.getInstanceByDom(f).resize();
                });
            }
        }
    }
}